import { Form, InputNumber, Col } from "antd";
interface FormInputNumberProps{
    placeholder: string,
    width: number,
    name:string,
    label:string,
    require:boolean
}

const FormItemInputNumber = (props: FormInputNumberProps) => {
    return (
        <Col style={{margin:"16px 0"}}>
        <Form.Item name={props.name} required={props.require} label={props.label}>
            <InputNumber min={0} max={999} style={{ width: props.width}}/>
        </Form.Item>
        </Col>
    )
}
FormItemInputNumber.defaultProps = {
    placeholder:"请输入",
    width:150,
    require:false
}
export default FormItemInputNumber;
export type {FormInputNumberProps}